<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>$config_overwrite</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Smarty 3 Manual">
<link rel="up" href="api.variables.html" title="Chapter 13. Smarty Class Variables">
<link rel="prev" href="variable.config.dir.html" title="$config_dir">
<link rel="next" href="variable.config.read.hidden.html" title="$config_read_hidden">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">$config_overwrite</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="variable.config.dir.html">Prev</a> </td>
<th width="60%" align="center">Chapter 13. Smarty Class Variables</th>
<td width="20%" align="right"> <a accesskey="n" href="variable.config.read.hidden.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="sect1" title="$config_overwrite">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="variable.config.overwrite"></a>$config_overwrite</h2></div></div></div>
<p>
    If set to <code class="constant">TRUE</code>, the default then variables read in from
    <a class="link" href="config.files.html" title="Chapter 9. Config Files">config files</a> will overwrite each
    other. Otherwise, the variables will be pushed onto an array. This is
    helpful if you want to store arrays of data in config files, just list
  each element multiple times.
  </p>
<div class="example">
<a name="id417936"></a><p class="title"><b>Example 13.2. Array of config #variables#</b></p>
<div class="example-contents">
<p>
      This examples uses
      <a class="link" href="language.function.cycle.html" title="{cycle}"><code class="varname">{cycle}</code></a>
      to output a table with alternating red/green/blue row colors
      with <em class="parameter"><code>$config_overwrite</code></em> = <code class="constant">FALSE</code>.
    </p>
<p>The config file.</p>
<pre class="programlisting">

# row colors
rowColors = #FF0000
rowColors = #00FF00
rowColors = #0000FF

    </pre>
<p>
      The template with a <a class="link" href="language.function.section.html" title="{section},{sectionelse}">
      <code class="varname">{section}</code></a> loop.
      </p>
<pre class="programlisting">

&lt;table&gt;
  {section name=r loop=$rows}
  &lt;tr bgcolor="{cycle values=#rowColors#}"&gt;
    &lt;td&gt; ....etc.... &lt;/td&gt;
  &lt;/tr&gt;
  {/section}
&lt;/table&gt;

    </pre>
</div>
</div>
<br class="example-break"><p>
    See also
    <a class="link" href="language.function.config.load.html" title="{config_load}"><code class="varname">{config_load}</code></a>,
    <a class="link" href="api.get.config.vars.html" title="getConfigVars()"><code class="varname">getConfigVars()</code></a>,
    <a class="link" href="api.clear.config.html" title="clearConfig()"><code class="varname">clearConfig()</code></a>,
    <a class="link" href="api.config.load.html" title="configLoad()"><code class="varname">configLoad()</code></a>
    and the <a class="link" href="config.files.html" title="Chapter 9. Config Files">config files section</a>.
  </p>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="variable.config.dir.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="api.variables.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="variable.config.read.hidden.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">$config_dir </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> $config_read_hidden</td>
</tr>
</table>
</div>
</body>
</html>
